var events=require('events');
var Emitter=events.EventEmitter;
var util=require('util');
function Radio(name,frequency){
    Emitter.call(this);
    this.name=name;
    this.frequency=frequency;
}
util.inherits(Radio,Emitter);
Radio.prototype.play=function(){
    console.log(`"${this.name}"  ${this.frequency} opened`);
    setTimeout(()=>{
        console.log('lalala...');
    },2000);
}
Radio.prototype.stop=function(){
    console.log(`"${this.name}"  ${this.frequency} closed`);
}
module.exports=Radio;